<?php
$params = array_merge( require __DIR__ . '/../../common/config/params.php' , require __DIR__ . '/../../common/config/params-local.php' , require __DIR__ . '/params.php' , require __DIR__ . '/params-local.php' );

return [
    'id'                  => 'app-backend' ,
    'basePath'            => dirname( __DIR__ ) ,
    'defaultRoute'        => 'index/main' ,
    'controllerNamespace' => 'backend\controllers' ,
    'bootstrap'           => [ 'log' ] ,
    'modules'             => [] ,
    'charset'             => 'utf-8' ,
    'language'            => 'zh-CN' ,
    'timeZone'            => 'Asia/Shanghai' ,
    'components'          => [
        'assetManager'=>[
            'bundles'=>[
                'yii\web\JqueryAsset'=>[
                    'sourcePath' => NULL ,
                    'js'         => [
                        '/js/jquery.min.js'
                    ],
                ],
            ],
        ],
        'request'      => [
            'csrfParam' => '_csrf-backend' ,
        ] ,
        'user'         => [
            'identityClass'   => 'backend\models\AdminUser' ,
            'enableAutoLogin' => FALSE ,
            'loginUrl'        => [ 'login/login' ] ,
            'identityCookie'  => [ 'name' => '_identity-backend' , 'httpOnly' => TRUE ] ,
        ] ,
        'session'      => [
            // this is the name of the session cookie used for login on the backend
            'name' => 'advanced-backend' ,
        ] ,
        'log'          => [
            'traceLevel' => YII_DEBUG ? 3 : 0 ,
            'targets'    => [
                [
                    'class'  => 'yii\log\FileTarget' ,
                    'levels' => [ 'error' , 'warning' ] ,
                ] ,
            ] ,
        ] ,
        'errorHandler' => [
            'errorAction' => 'site/error' ,
        ] ,
        'urlManager'   => [
            'enablePrettyUrl'     => TRUE ,
            'enableStrictParsing' => FALSE ,
            'showScriptName'      => true ,
            'suffix'              => '.html' ,
        ] ,
    ] ,
    'params'              => $params ,
];
